package kd.comt.plugin;
import kd.bos.bill.BillShowParameter;
import kd.bos.bill.OperationStatus;
import kd.bos.form.ShowFormHelper;
import kd.bos.form.ShowType;
import kd.bos.form.StyleCss;
import kd.bos.form.control.events.ItemClickEvent;
import kd.bos.list.ListShowParameter;
import kd.bos.list.plugin.AbstractListPlugin;

public class xzcs001 extends AbstractListPlugin{
    //待打开的页面
    private static String KEY_FORMID = "bpgx_xc";
    private static String TITLE = "相册";

    public void itemClick(ItemClickEvent evt){
        super.itemClick(evt);
        String key = evt.getItemKey();
        switch(key){
            case "bpgx_xzcs001":
                //打开列表界面
                ListShowParameter listShowParameter = ShowFormHelper.createShowListForm(KEY_FORMID, false, 0, true);
                StyleCss style = new StyleCss();
                style.setWidth("1000");
                style.setHeight("600");
                listShowParameter.getOpenStyle().setInlineStyleCss(style);
                listShowParameter.setCaption(TITLE);
                this.getView().showForm(listShowParameter);

                //打开新增界面
                BillShowParameter billShowParameter = new BillShowParameter();
                billShowParameter.setFormId(KEY_FORMID);
                billShowParameter.getOpenStyle().setShowType(ShowType.Modal);
                billShowParameter.setStatus(OperationStatus.EDIT);
                this.getView().showForm(billShowParameter);

                //
                ListShowParameter list2 =new ListShowParameter();
                list2.setFormId("bos_list");
                list2.setBillFormId(KEY_FORMID);
                list2.getOpenStyle().setShowType(ShowType.Modal);
                this.getView().showForm(list2);
                
        }
    }


}
